package workerUIs;

import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

/**
 * AbstractStepFrame class.
 * 
 * @author Mark Czotter
 * @author Miklos Szennai
 * 
 */
public class StepFrame extends JFrame {

	private JButton nextButton;
	private JTextArea textArea;
	
	public StepFrame(String title, int posX, int posY) {
		super(title);
		this.setDefaultCloseOperation(EXIT_ON_CLOSE);
		this.setLocation(posX, posY);
		this.initializeGui();
		this.setSize(400, 400);
	}

	public void initializeGui() {
		this.nextButton = new JButton("Next Step");
		this.nextButton.setEnabled(false);
		this.textArea = new JTextArea();
		this.textArea.setEditable(false);
		JScrollPane scrollPane = new JScrollPane(textArea);
		this.getContentPane().add(scrollPane, BorderLayout.CENTER);
		this.getContentPane().add(this.nextButton, BorderLayout.SOUTH);
		this.pack();
		this.setVisible(true);
	}
	
	public JButton getNextButton() {
		return nextButton;
	}
	
	public JTextArea getTextArea() {
		return textArea;
	}
	
}
